package com.baidu.process.chat.parser.sourceHandler;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

/**
 * @Author:fangyuchao
 * @Description:
 * @Date: Create in 11:35 2022/11/8
 */
@Service
public class SourceHandlerFactory {
    @Autowired
    private BaseSourceHandler clarifyHandler;
    @Autowired
    private BaseSourceHandler taskBaseHandler;
    @Autowired
    private BaseSourceHandler systemHandler;
    @Autowired
    private BaseSourceHandler tableHandler;
    @Autowired
    private BaseSourceHandler chitChatHandler;
    @Autowired
    private BaseSourceHandler faqHandler;

    public BaseSourceHandler chooseSourceHandler(String source){{
        switch (source){
            case "clarify":
                return this.clarifyHandler;
            case "system":
                return this.systemHandler;
            case "table_qa":
                return this.tableHandler;
            case "chitchat":
                return this.chitChatHandler;
            case "faq":
                return this.faqHandler;
            default:
                return this.taskBaseHandler;
        }

    }
    }










}
